SVM patch to enable SMI intercept.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 22 Mar 2006 09:36:22 +0000 (10:36 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 22 Mar 2006 09:36:22 +0000 (10:36 +0100)
Signed-off-by: Tom Woller <thomas.woller@amd.com>
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/svm/vmcb.c

index a19468a9a049ccc5a5467787daf627d0dc923a47..4e6965feac4106418c850a5f9ad5700d438344a5 100644 (file)
@@ -2414,6 +2414,15 @@ asmlinkage void svm_vmexit_handler(struct cpu_user_regs regs)
         do_nmi(&regs, 0);
         break;
 
+    case VMEXIT_SMI:
+        /*
+         * For asynchronous SMI's, we just need to allow global interrupts 
+         * so that the SMI is taken properly in the context of the host.  The
+         * standard code does a STGI after the VMEXIT which should accomplish 
+         * this task.  Continue as normal and restart the guest.
+         */
+        break;
+
 #ifdef XEN_DEBUGGER
     case VMEXIT_EXCEPTION_BP:
         svm_debug_save_cpu_user_regs(&regs);
index 00e06d86b0b9d6aebecf1388113e399dc5334dda..eeca39ee68bd4e203de72b030cd2c011bdc12c23 100644 (file)
@@ -123,7 +123,7 @@ static int construct_vmcb_controls(struct arch_svm_struct *arch_svm)
           GENERAL1_INTERCEPT_RDTSC         | GENERAL1_INTERCEPT_PUSHF      |
           GENERAL1_INTERCEPT_SWINT         | GENERAL1_INTERCEPT_POPF       | 
           GENERAL1_INTERCEPT_IRET          | GENERAL1_INTERCEPT_PAUSE      |
-          GENERAL1_INTERCEPT_TASK_SWITCH
+          GENERAL1_INTERCEPT_TASK_SWITCH   | GENERAL1_INTERCEPT_SMI
         );
 
     /* turn on the general 2 intercepts */